<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table{
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<form action="{% url 'kaoshi:result_add' %}" method="post">
    {% csrf_token %}
    <table border="1">
        <tr>
            <td>学生姓名</td>
            <td>
                <input type="text" name="stuName">
            </td>
        </tr>
        <tr>
            <td>成绩</td>
            <td>
                <input type="text" name="grade">
            </td>
        </tr>
        <tr>
            <td>科目</td>
            <td>
                <select name="sub">
                    {% for i in data %}
                        <option value="{{ i.id }}">{{ i.subName }}</option>
                    {% endfor %}
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="提交">
            </td>
        </tr>
    </table>
</form>
</body>
</html>